package com.huike.mapper;

import com.huike.pojo.Drug;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DrugMapper {
    List<Drug> getDrugs(@Param("drugName") String drugName,@Param("drugType") String drugType);

    Drug getDrugsById(Integer id);

    Integer addDrug(Drug drug);

    List<Drug> getDrugsByHospitalId(Integer id);
    Integer addResetNumber(@Param("id") Integer id,@Param("increase") Integer increase);

    Integer updateLogo(@Param("id") Integer id,@Param("img") String img);

    Integer updateDrug(Drug drug);

    Integer updateInTheSale(Integer id);

    Integer addDrugHospital(@Param("drugId")Integer drugId,@Param("hospitalId")Integer hospitalId);

    Integer subtractResetNumber(@Param("id") Integer id,@Param("increase") Integer increase);

    List<Drug> getRegisterDrug(Integer id);

    Integer getDrugNumbe(@Param("id")Integer id,@Param("drugId")Integer drugId);

    Integer grantDrug(@Param("id")Integer id,@Param("drugId")Integer drugId,@Param("number")Integer number);

    void updateEndStatus(Integer hospitalId);

    void updateChargeDate(@Param("id")Integer id,@Param("ChargeDate") String chargeDate);

    List<Drug> getDrugsAndChargeByHospitalId(@Param("hospitalId") Integer id);
}
